﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    x:Class="Gronia.WPF.Controls.ConnectContainerResourceDictionary"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Gronia.WPF.Controls">

    <Style TargetType="{x:Type local:ConnectionChild}">
        <Setter Property="Background" Value="Red"/>
        <Setter Property="FontFamily" Value="Webdings"/>
        <Setter Property="FontSize" Value="13.333" />
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="Width" Value="250"/>
        <Setter Property="MinHeight" Value="50"/>
        <Setter Property="MinWidth" Value="50"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Top"/>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:ConnectionChild}">
                    <Border Width="{TemplateBinding Width}" Background="{TemplateBinding Background}" CornerRadius="5">
                        <Grid>
                            <ItemsControl HorizontalAlignment="Left" ItemsSource="{TemplateBinding InputPoints}">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <Thumb PreviewMouseDown="OnMouseDown" AllowDrop="True" DragStarted="Drag_Started" Drop="Drag_Ended" Tag="{Binding}" Width="10" Height="10" Margin="0,0,0,5" />
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                            <ItemsControl HorizontalAlignment="Right" ItemsSource="{TemplateBinding OutputPoints}">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <Thumb PreviewMouseDown="OnMouseDown" AllowDrop="True" DragStarted="Drag_Started" Drop="Drag_Ended" Width="10" Tag="{Binding}" Height="10" Margin="0,0,0,5" />
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:ConnectContainer}">
        <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    </Style>
</ResourceDictionary>